﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net.Sockets;
using Utilities;

namespace Client
{

    public partial class DangNhap : Form
    {
        static string HOST_IP_ADDRESS = "127.0.0.1";
        public const int PORT_TO_CONNECT = 2011;
        Socket socket;
        
        public DangNhap()
        {
            InitializeComponent();
            //HOST_IP_ADDRESS = System.Net.Dns.GetHostAddresses("localhost").ToString();
        }

        private void btnDangNhap_Click(object sender, EventArgs e)
        {
            //SocketInformation inform = new SocketInformation();
            //Khởi tạo socket nếu cần thiết
            if (socket == null)
            {
                socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP);                
            }


            Msg msg = new Msg();
            msg.strUser = "vdkhai";
            msg.strPassword = "khaivd";

            byte[] byteArray = msg.ToByteArray();


            Msg msg2 = Msg.GetLoginMessage(byteArray);

        }
    }
}
